package me.dz.dreamcleaner.manager;

import org.bukkit.entity.*;

public enum MobsType {
    WATERMOB{
        @Override
        public boolean canClear(Entity entity) {
            return entity instanceof WaterMob;
        }

        @Override
        public boolean canRun() {
            try {
                Object object = WaterMob.class;
                return true;
            }catch (NoClassDefFoundError ignored){
                return false;
            }
        }
    },
    MONSTER{
        @Override
        public boolean canClear(Entity entity) {
            return entity instanceof Monster;
        }

        @Override
        public boolean canRun() {
            try {
                Object object = Monster.class;
                return true;
            }catch (NoClassDefFoundError ignored){
                return false;
            }
        }
    },
    ANIMALS{
        @Override
        public boolean canClear(Entity entity) {
            return entity instanceof Animals;
        }

        @Override
        public boolean canRun() {
            try {
                Object object = Animals.class;
                return true;
            }catch (NoClassDefFoundError ignored){
                return false;
            }
        }
    },
    NPC{
        @Override
        public boolean canClear(Entity entity) {
            return entity instanceof NPC;
        }

        @Override
        public boolean canRun() {
            try {
                Object object = NPC.class;
                return true;
            }catch (NoClassDefFoundError ignored){
                return false;
            }
        }
    },
    FLYING{
        @Override
        public boolean canClear(Entity entity) {
            return entity instanceof Flying;
        }

        @Override
        public boolean canRun() {
            try {
                Object object = Flying.class;
                return true;
            }catch (NoClassDefFoundError ignored){
                return false;
            }
        }
    },
    GOLEM{
        @Override
        public boolean canClear(Entity entity) {
            return entity instanceof Golem;
        }

        @Override
        public boolean canRun() {
            try {
                Object object = Golem.class;
                return true;
            }catch (NoClassDefFoundError ignored){
                return false;
            }
        }
    },
    SLIME{
        @Override
        public boolean canClear(Entity entity) {
            return entity instanceof Slime;
        }

        @Override
        public boolean canRun() {
            try {
                Object object = Slime.class;
                return true;
            }catch (NoClassDefFoundError ignored){
                return false;
            }
        }
    },
    AMBIENT{
        @Override
        public boolean canClear(Entity entity) {
            return entity instanceof Ambient;
        }

        @Override
        public boolean canRun() {
            try {
                Object object = Ambient.class;
                return true;
            }catch (NoClassDefFoundError ignored){
                return false;
            }
        }
    }
    ;

    public abstract boolean canClear(Entity entity);

    public abstract boolean canRun();
}
